#ifndef MESSAGESREQUEST_H
#define MESSAGESREQUEST_H

#include <QDebug>
#include <QHash>
#include <QStringList>

#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkCookie>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>

#include <QtXml/QDomDocument>

#include "executionobjectinterface.h"
#include "message.h"

class MessagesRequest : public ExecutionObjectInterface
{
    Q_OBJECT
public:
    MessagesRequest(QObject *parent = 0);
    MessagesRequest(QString cookieData, QObject *parent = 0);
    ~MessagesRequest();

public slots:
    void doInBackground();
    void onPostExecute();
    void onNetworkReply(QNetworkReply *reply);

signals:
    void responseData(QHash<QString, QList<Message> > *);

private:
    QString urlPath_;

    QString cookieData_;

    QNetworkAccessManager *manager_;
};

#endif // MESSAGESREQUEST_H
